import os
import cv2

file_path = "/Users/hqqs/Desktop/1000m/red/"
list = []

for root,dirs,files in os.walk(file_path):
    for file in files:
        list.append(file)

video = cv2.VideoWriter(file_path+"1000m_src4.avi",
                        cv2.VideoWriter_fourcc(*'MJPG'),1,(10992,10992))

for i in range(1,len(list)):
    img = cv2.imread(file_path+str(i)+'.png')
    #img = cv2.resize(img,(1080,1080))
    video.write(img)
